package com.hrm.action;

import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;

import com.hrm.pojo.Salary;
import com.hrm.service.SalaryService;

@Namespace("/manager")
public class SalaryAction {

	private SalaryService salaryService;
	private List<Salary> salayList;
	
	@Action(value="salary",results={@Result(name="success",type="dispatcher",location="/WEB-INF/content/membermanager/salary.jsp")})
	public String excute(){
		salayList = salaryService.findAllSalaries();
		
		return "success";
	}


	@Autowired
	public void setSalaryService(SalaryService salaryService) {
		this.salaryService = salaryService;
	}


	public List<Salary> getSalayList() {
		return salayList;
	}


	public void setSalayList(List<Salary> salayList) {
		this.salayList = salayList;
	}
	
	
	
}
